{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}


{% block title %}账户管理{% endblock %}

{% block page_content %}

<form action="/account_manager" method="post" name="account_manager">
    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>

    <div class="form-row">
        <div class="form-group col-md-2">
            <label>账户类型</label>
            <select name="type_id" class="form-control">
                <option value="">--请选择账户类型--</option>
                {% if account_type_json %}
                    {% for info in account_type_json %}
                        <option value="{{ info.get('id') }}">{{ info.get('name') }}</option>
                    {% endfor %}
                {% endif %}
            </select>
        </div>

        <div class="form-group col-md-4">
            <label>账户名称</label>
            <input type="text" class="form-control" id="account_name" name="account_name" placeholder="账户名称">
        </div>

    </div>

    <button type="submit" class="btn btn-primary ">提交</button>

  </form>
    <br><br>

<table class="table table-bordered">
        <tr>
            <th>账户类型</th>
            <th>账户名称</th>
        </tr>
            {% if json_data %}
                 {% for foo in json_data %}
                    <tr>
                      <td>{{ foo.get('name') }}</td>
                      <td>{{ foo.get('account_name') }}</td>
                    </tr>
                 {% endfor %}
            {% endif %}

</table>



{% endblock %}
